﻿@model System.Data.DataTable

<form id="form1" method="post" action="/Test/SaveCustomForm">
    <table cellpadding="0" cellspacing="1" border="0" width="99%" class="formtable">
        <tr>
            <th style="width: 80px;">名称</th>
            <td><input type="text" name="Name" class="mytext" value="@(Model.Rows.Count>0?Model.Rows[0]["f1"].ToString():"")" validate="empty" errmsg="标题不能为空!" style="width: 75%" /></td>
        </tr>
        <tr>
            <th>富文本</th>
            <td><textarea class="mytextarea" name="Html" id="Contents" model="html" validate="editor" errmsg="内容不能为空!" style="width: 75%;height:80px;">
内容内容
            </textarea></td>

        </tr>
        <tr>
            <th>时间1</th>
            <td><input type="text" class="mycalendar" id="Time1" name="Time1" style="width:90px;" value="" /></td>
        </tr>
        <tr>
            <th>时间2</th>
            <td><input type="text" class="mycalendar" id="Time2" name="Time2" style="width:90px;" value="" /></td>
        </tr>
        <tr>
            <th>下拉选择</th>
            <td><select class="myselect" id="Type" name="Type"><option value="">全部</option><option value="1">11111</option></select></td>
        </tr>
        <tr>
            <th>搜索下拉选择</th>
            <td><select class="myselect2" id="flowId" name="flowId" style="width:210px;"><option value=""></option><option value="1">11111</option></select></td>
        </tr>
        <tr>
            <th>人员</th>
            <td>
                <input type="text" user="true" dept="false" value="" station="false" unit="false" more="false" group="false" id="UserID" name="UserID" class="mymember" />
            </td>
        </tr>
        <tr>
            <th>按钮</th>
            <td>
                <input type="button" class="mybutton" name="delete1" value="将选择消息标记为已读" onclick="" />
            </td>
        </tr>
        <tr>
            <th>备注说明：</th>
            <td><textarea class="mytextarea" id="Note" name="Note" cols="1" rows="1" style="width:95%;height:50px;">xxxxx</textarea></td>
        </tr>
    </table>
</form>

<div>
    <h1>Tree控件</h1>
    <div id="tree"></div>

</div>

<div>
    <h1>穿梭框</h1>
</div>


<script src="~/RoadFlowResources/scripts/ckeditor/ckeditor.js"></script>
<script src="~/RoadFlowResources/scripts/flowRun/form.js"></script>



<!--tree控件相关脚本-->
<script type="text/javascript">
    var roadTree = null;
    $(function () {
        //path,好用用于加载第1级
        //refreshpath,好像用于子级
        roadTree = new RoadUI.Tree({ id: "tree", path: "/res/jjtest/tree.json", refreshpath: "/res/jjtest/TreeRefresh.json", onclick: openUrl });
    });
    function openUrl(json) {
        alert('你点击了: ' + json.title);
    }
    function reLoad(id) {
        roadTree.refresh(id);
    }
</script>


<!--富文件相关脚本-->
<script>
    $(function () {
        var editor = CKEDITOR.replace("Contents", {
            height: 300,
            toolbarGroups: formLoad.ckeditor_toolbarFullGroups,
            filebrowserImageUploadUrl: '/RoadFlowCore/Controls/SaveCKEditorFiles'
        });
    });
    CKEDITOR.on('instanceReady', function (e) {
        parent.setIframeHeight();
    });
</script>